package com.string.practice;

public class choose {
    public static void main(String[] args) {
        String s="Hello World Nice TO Meet You";
        StringBuilder stringBuilder=new StringBuilder();
        char[] chars = s.toCharArray();
        for (int length = chars.length-1; length > 0; length--) {
            if (chars[length]==' ')break;
            stringBuilder.append(chars[length]);
        }
        System.out.println(stringBuilder.reverse().length());
    }
}
